Skip to content

Conversation

@jelly
Copy link
Contributor

@jelly jelly commented Oct 29, 2024

MenuToggleCheckboxProps inherits from HTMLInputElement and defaultChecked is typed there as undefined | boolean, null is not a valid type.

Found by typescript's tsc in strict mode.

MenuToggleCheckboxProps inherits from HTMLInputElement and
defaultChecked is typed there as `undefined | boolean`, null is not a
valid type.

Found by typescript's `tsc` in strict mode.
@patternfly-build
Copy link
Collaborator

patternfly-build commented Oct 29, 2024

@tlabaj tlabaj requested a review from kmcfaul October 29, 2024 14:51
Copy link
Contributor

@kmcfaul kmcfaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. It might have gotten set that way because isChecked is boolean | null to support indeterminate checkboxes, but defaultChecked should be just a boolean.

@tlabaj tlabaj requested review from a team, mattnolting, tlabaj and wise-king-sullyman and removed request for a team, mattnolting and wise-king-sullyman November 13, 2024 14:44
@tlabaj tlabaj merged commit 838d64a into patternfly:main Nov 13, 2024
@jelly jelly deleted the menutoggle-defaultchecked branch November 13, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants